package ModelLayer;



import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class DVD_RegisterTest.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class DVD_RegisterTest
{
    /**
     * Default constructor for test class DVD_RegisterTest
     */
    private DVD_Register dvd;
    public DVD_RegisterTest()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
        dvd = DVD_Register.getInstance();
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }

    @Test
    public void DVD_Register()
    {
        dvd.addDVD("ID", "Title", "Artist", "PublicationDate");
        dvd.findDVD("ID");
        java.util.ArrayList<ModelLayer.DVD> arrayLis1 = dvd.showDVDS();
        assertEquals(arrayLis1, arrayLis1);
        dvd.findDVD("ID");
        ModelLayer.DVD dVD1 = dvd.findDVD("Title");
        assertEquals(dVD1, dVD1);
        dvd.updateInformation("NewID", "Title", "NewArtist", "NewPublicationDate");
        dvd.removeDVD("Title");
    }
}

